home *** CD-ROM | disk | FTP | other *** search
- class FreshDebug
- {
- function FreshDebug()
- {
- }
- static function Assert(expression, stringForm)
- {
- if(_global._dbgAssertEnabled && !expression)
- {
- var _loc2_ = "FRESH ASSERT: Expression \'" + stringForm + "\'";
- throw _loc2_;
- }
- return expression;
- }
- static function Trace(msg, tag)
- {
- if(_global._dbgTraceEnabled)
- {
- if(!FreshDebug.IsSuppressed(tag))
- {
- if(_root._debugWindow)
- {
- CDebugWindow(_root._debugWindow).Trace(msg);
- }
- }
- }
- }
- static function Suppress(tag)
- {
- if(tag == undefined || tag.length == 0)
- {
- tag = "<undefined>";
- }
- if(!_global._mapSuppressedTags)
- {
- _global._mapSuppressedTags = new Array();
- }
- _global._mapSuppressedTags[tag] = true;
- }
- static function Unsuppress(tag)
- {
- if(tag == undefined || tag.length == 0)
- {
- tag = "<undefined>";
- }
- if(_global._mapSuppressedTags)
- {
- _global._mapSuppressedTags[tag] = undefined;
- }
- }
- static function IsSuppressed(tag)
- {
- if(tag == undefined || tag.length == 0)
- {
- tag = "<undefined>";
- }
- if(!_global._mapSuppressedTags)
- {
- return false;
- }
- return _global._mapSuppressedTags[tag];
- }
- }
-